package com.zhou.project.components.base.service;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhou.project.components.base.entity.Base;
import com.zhou.project.configurations.security.authentication.CurrentAuthentication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @project spring-boot-project
 * @author zhouhonggang
 * @datetime 2021/8/14 13:14
 * @version 1.0.0
 * @description: 公共逻辑层实现类
 */
@Transactional(
    timeout = 60,
    readOnly = true,
    rollbackFor = Exception.class,
    noRollbackFor = RuntimeException.class,
    isolation = Isolation.REPEATABLE_READ
)
public class BaseService<D extends BaseMapper<T>, T extends Base> extends ServiceImpl<D, T> {
    @Autowired
    public CurrentAuthentication currentAuthentication;
}
